<template>
  <div class="detail">
    <router-view />
  </div>
</template>

<script>
export default {
  name: "Detail",
  beforeRouteEnter(to, from, next) {
    if (localStorage.getItem("token")) {
      next();
    } else {
      next({ path: "/login" });
    }
  },
};
</script>

<style lang="scss" scoped>
.detail {
  color: white;
  background-color: #121212;
}
</style>